<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="my.dao.*"%>
<%
  String eid =  request.getParameter("e_id" );
  String epwd = request.getParameter("e_pwd");
  
  String sql = 
			"select count(*) from emp where e_id=? and e_pwd=?";
		
		int cnt = MyDao.queryInteger(sql,eid,epwd);
		
		if(cnt>0){//登录成功
			
			//将用户信息存储起来
			session.setAttribute("CurrUserID", eid);
		
		
			out.print(MyDao.jsonMessage(true, "登录成功！"));
		}else{
			out.print(MyDao.jsonMessage(false, "帐户或密码不匹配！"));
		}



%>